const { defineConfig } = require('@vue/cli-service')
console.log(process.env.VUE_APP_REQUEST_URL);

module.exports = defineConfig({
  transpileDependencies: true,
  publicPath:"/init/",

  pages: {
    index: {
      entry: "./src/index/main.js",
      template: "./public/index.html"

    },

    film: {
      entry: "./src/film/main.js",
      template: "./public/film.html"
    }
  },

  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'scss',
      patterns: ["./src/index/scss/var.scss"]
    }
  },
  devServer:{
   proxy:{
    "/proxy":{
       target: "http://127.0.0.1:3000",
       pathRewrite: {
         // key:取值正则表达式,获取被重置的路径
         // value：为重置结果
         "^/proxy": ""
       },
       // 改变日志等级 默认info
       logLevel: "debug",  // 每一个代理请求都会在启动的控制台上产生日志记录
       logProvider: () => console // 设置日志的
    }
   }
  }
})


